﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ViewListCourse : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        DataSourceSelectArguments sc = new DataSourceSelectArguments();
        String courseName = TextBox1.Text;
        String teacher = DropDownList1.SelectedItem.Value;
        String cost = TextBox3.Text;
        String startday = TextBox4.Text;
           

        SqlDataSource1.InsertCommand = "INSERT INTO COURSES (course_name,teacher_id,cost,start_date) VALUES ('" + courseName + "','" + teacher +"','" + cost + "','" + startday + "')";
        SqlDataSource1.Insert();
        

    }
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
}